package com.njegovanobradovic.icet.facade;

import java.util.Date;
import java.util.LinkedList;
import java.util.List;

import org.apache.tapestry5.services.Request;
import org.apache.tapestry5.services.Session;

import com.njegovanobradovic.icet.facade.impl.ControllerImpl;
import com.njegovanobradovic.icet.metamodel.Chat;
import com.njegovanobradovic.icet.metamodel.Message;
import com.njegovanobradovic.icet.metamodel.Room;
import com.njegovanobradovic.icet.metamodel.User;
import com.njegovanobradovic.icet.metamodel.beans.MessageBean;
import com.njegovanobradovic.icet.metamodel.beans.RoomBean;
import com.njegovanobradovic.icet.service.Add;
import com.njegovanobradovic.icet.service.Delete;
import com.njegovanobradovic.icet.service.Get;
import com.njegovanobradovic.icet.service.GetChatMessages;
import com.njegovanobradovic.icet.service.GetChatUsers;
import com.njegovanobradovic.icet.service.GetUserChats;
import com.njegovanobradovic.icet.service.Update;
import com.njegovanobradovic.icet.util.translate.GoogleAPI;
import com.njegovanobradovic.icet.util.translate.Language;
import com.njegovanobradovic.icet.util.translate.Translate;

public interface Controller {
	// Generated Getters and Setters//
	public Get<User> getUserList();

	public void setUserList(Get<User> userList);

	public Update<User> getUpdatedUser();

	public void setUpdatedUser(Update<User> updatedUser);

	public Add<User> getAddUser();

	public void setAddUser(Add<User> addUser);

	public Delete<User> getDeletedUser();

	public void setDeletedUser(Delete<User> deletedUser);

	public Get<Chat> getChatList();

	public void setChatList(Get<Chat> chatList);

	public Add<Chat> getAddChat();

	public void setAddChat(Add<Chat> addChat);

	public Update<Chat> getUpdateChat();

	public void setUpdateChat(Update<Chat> updateChat);

	public Delete<Chat> getDeletedChat();

	public void setDeletedChat(Delete<Chat> deletedChat);

	public GetUserChats getUserChats();

	public void setUserChats(GetUserChats userChats);

	public GetChatUsers getChatUsers();

	public void setChatUsers(GetChatUsers chatUsers);

	public GetChatMessages getChatMessages();

	public void setChatMessages(GetChatMessages chatMessages);

	public User getUser();

	public void setUser(User user);

	public Request getRequest();

	public void setRequest(Request request);
	
	public String getMessage();

	public void setMessage(String message);

	// CommandMethods//
	//User//
	public List<User> getAllUsers();

	public User updateUser(User user);

	public User deleteUser(String username, String password);

	public User addUser(User user);
	
	//Chat//
	public List<Chat> getAllChats();
	
	public Chat saveChat(Chat chat);
	
	public Chat updateChat(Chat chat);

	//ListMethods//
	public List<Chat> getChatsOfUser(User user);
	
	public List<User> getUsersFromChat(Chat chat);
	
	public List<Message> getMessagesFromChat(Chat chat);
	
	//Methods//
	//UserMethods//
	public User getUser(String username);

	public User checkUser(String username, String password);
	
	public boolean userLogin(String username, String password);

	public boolean userLogout();

	public boolean isLoggedIn();

	public User getLoggedUser();
	
	public boolean getLoggedSignal();
	
	public void removeChatFromChatList(User user, Chat chat);
	
	public void signUpUser(User user, String rePassword);

	//ChatMethods//
	public Chat createChat(Chat chat, User u1, User u2);
	

	public void addWelcomeMessageToChat(String text, Chat chat);
	
	public void addMessageToChat(User user,String text, Chat chat);
	
	public Chat getChat(String name);
	
	public List<User> getChatUsers(Chat chat);
	
	public List<Message> getChatMessages(Chat chat);
	
	public void removeUserFromChat(User user, Chat chat);
	
	//Translator//
	public String translate(String message, Language l1, Language l2);

}
